<template>
  <div class="Familyhistory">
    <van-cell-group>
      <van-cell title="家族病"
                :value="familyHistory.familyDiseaseName?'是':'否'"/>
      <van-cell title="家族病名称"
                :label="familyHistory.familyDiseaseName?familyHistory.familyDiseaseName:'无'"/>
      <van-cell title="是否结婚"
                :value="familyHistory.marryState==1?'是':'否'"/>
      <van-cell title="是否生育"
                :value="familyHistory.bearState==1?'是':'否'"/>
    </van-cell-group>
  </div>
</template>

<script>
import {mapGetters} from "vuex";

export default {
  name: 'Familyhistory',
  data() {
    return {
      familyHistory: '',
    }
  },
  computed: {
    ...mapGetters(['userPhone'])
  },
  mounted() {
    this.getFamilyHistory();
  },
  methods: {
    //获取家族史
    getFamilyHistory() {
      this.$service.medicalHistoryService.getFamilyHistory(this.userPhone).then(res => {
        this.familyHistory = res.data.data[0];
      })
    }
  },
}
</script>

<style scoped lang="less">

</style>
